package com.aierkeji.call.cms.entity.contants;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import com.aierkeji.call.cms.entity.vo.SearchOptionsVo;
import com.fasterxml.jackson.annotation.JsonFormat;

@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum CallStatus {
	NONE("未拨打"), UNCONNECT("未呼通"), CONNECT("已呼通");
	private String name;

	public String getName() {
		return name;
	}

	private CallStatus(String name) {
		this.name = name;
	}

	public static List<SearchOptionsVo> changeSearchOptionVo() {
		Stream<CallStatus> stream = Arrays.stream(CallStatus.values());
		List<SearchOptionsVo> list = stream.map(k -> new SearchOptionsVo(k.getName(), k.name()))
				.collect(Collectors.toList());
		return list;
	}
}
